/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sgep.actions;

import com.opensymphony.xwork2.ActionSupport;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import sgep.po.Application;
import sgep.tools.Json;

/**
 *
 * @author mg
 */
public class TestJson extends ActionSupport{
    private List ids;
    private boolean success=true;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public List getIds() {
        return ids;
    }

    public void setIds(List ids) {
        this.ids = ids;
    }
    @Override
    public String execute() throws Exception {
        Application a = new Application();
        a.setId("id1");
        Application b = new Application();
        b.setId("id2");
        ids = new ArrayList();
        ids.add(a);
        ids.add(b);
//        response.setContentType("text/xml");
//        response.getWriter().write(message);
        return "success";
    }

}
